Re: Images in Database

Поиск
Список
Период
Сортировка
От M. Bastin
Тема Re: Images in Database
Дата
Msg-id a0602041bbc8be4f1284d@[192.168.0.101]
обсуждение исходный текст
Ответ на Re: Images in Database  (Reshat Sabiq <sabiq@purdue.edu>)
Список pgsql-novice
At 5:33 PM -0600 3/27/04, Reshat Sabiq wrote:
>Valid point. Maintenance might be easier (although i don't think you
>can dump and move images easily to another DB;

Yes you can with COPY or pg_dump.

>  you'd probably have to do some kind of direct connection to another
>DB to move them). When in a filesystem, you could bzip everything,
>and move them easily. There could also be an URL-prefix field for
>each client, followed by a URL suffix field for each image. Thus
>maintenance most of the time would be as easy as changing the prefix.

Like you say: "most of the time" and of course you'll run into the
other situations sooner or later...

>However, no matter how small an image is, it takes the same amount
>of BLOB space, doesn't it. This, IMHO, means a lot of wasted storage.

There is no wasted storage.  You'll use up as much disk space whether
you store separate files or whether you put those bytes inside the
database.  There's no minimum size for bytea data.

>  Not sure if that also affects performance to some small degree.

Nope, your searches are done on indexes (which don't contain the image data).

Marc

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Images in Database
Следующее
От: Roberto Rezende de Assis
Дата:
Сообщение: Doubt on foreign key and deletions